package com.peng.design.visitor;

import lombok.extern.slf4j.Slf4j;

/**
 * SoldierVisitor
 *
 * @author: lupeng10
 * @create: 2023-06-08 14:41
 */
@Slf4j
public class SoldierVisitor implements UnitVisitor {
    @Override
    public void visit(CommanderUnit commanderUnit) {
        // ignore
    }

    @Override
    public void visit(SergeantUnit sergeantUnit) {
        // ignore
    }

    @Override
    public void visit(SoldierUnit soldierUnit) {
        log.info("访问SoldierUnit {}", soldierUnit.getName());
    }
}
